import { ApiProperty } from '@nestjs/swagger';
import { DataType } from 'sequelize-typescript';

import { AccessType } from '@/utils/types/administrative';

export class CreateFileCollectionDto {
  // 任务id
  @ApiProperty({
    type: String,
    description: '任务id',
    default: '',
  })
  task_id: string;

  // 标题
  @ApiProperty({
    type: String,
    description: '标题',
    default: '',
  })
  title: string;

  // 内容
  @ApiProperty({
    type: String,
    description: '内容',
    default: '',
  })
  content: string;

  // 文件类型
  @ApiProperty({
    type: String,
    description: '文件类型',
    default: ['all'],
  })
  file_type: string;

  // 访问权限
  @ApiProperty({
    type: String,
    description: '访问权限',
    default: 'public',
  })
  access: AccessType;

  // 访问密码
  @ApiProperty({
    type: String,
    description: '访问密码',
    default: '',
  })
  access_pwd?: string;

  // 指定人员
  @ApiProperty({
    type: String,
    description: '指定人员',
    default: '',
  })
  submitter?: string[];

  // 审核人id
  @ApiProperty({
    type: String,
    description: '审核人id',
    default: '',
  })
  reviewer_id: string;

  // 审核时间
  @ApiProperty({
    type: Date,
    description: '审核时间',
    default: new Date().toLocaleString(),
  })
  review_time: Date;

  // 截止时间
  @ApiProperty({
    type: Date,
    description: '截止时间',
    default: new Date().toLocaleString(),
  })
  end_time: Date;

  // 创建人
  @ApiProperty({
    type: String,
    description: '创建人',
    default: '',
  })
  founder_id?: string;

  // status状态
  @ApiProperty({
    type: Number,
    description: '状态',
    default: 1,
  })
  status: number;

  // 是否置顶
  @ApiProperty({
    type: Number,
    description: '是否置顶',
    default: 1,
  })
  pinned: number;
}
